<template>
  <el-result
      icon="success"
      sub-title="点击申请报价，将由卖家进行称重提供价格"
      title="订单创建成功"
  >
    <template #extra>
      <el-button type="primary" @click="handleApply">申请报价</el-button>
    </template>
  </el-result>
</template>

<script setup>
import {toqMoney} from "@/apis/order.js";
import {useOrderDetailsStore} from "@/stores/order.js";
import {useRouter} from "vue-router"

const orderDetailsStore = useOrderDetailsStore()
const router = useRouter()
const handleApply = () => {
  toqMoney(orderDetailsStore.order.id).then(() => {
    orderDetailsStore.order.status = 2
    router.push({name: "muterorder"})
    // window.location.reload()
  })
}
</script>

<style scoped>

</style>